﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;

public partial class BottomNew : System.Web.UI.UserControl
{
    public string linkHtml;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //友情链接
            DataSet dslink = Socut.Data.ExecuteDataSet("select top 6 id,linkname,linkurl,linkorder from web_link order by linkorder");
            StringBuilder liBuilder = new StringBuilder();
            foreach (DataRow row in dslink.Tables[0].Rows)
            {
                liBuilder.Append(string.Format("<li><a href=\"{0}\" target=\"_blank\">{1}</a></li>",
                    row["linkurl"].ToString(), row["linkname"].ToString()));
            }
            linkHtml = liBuilder.ToString();
        }
    }
}
